package com.zc.designmodel.structural.criteria;

import java.util.List;
import java.util.stream.Collectors;

/**
 * @author: zhuCan
 * @date: 2020/4/12 17:49
 * @description:
 */
public class CriteriaMale implements Criteria {

  @Override
  public List<Person> meetCriteria(List<Person> people) {
    return people.stream()
        .filter(x->"MALE".equalsIgnoreCase(x.getGender()))
        .collect(Collectors.toList());
  }
}
